<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: msc_disk.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('msc__disk_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">msc_disk.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2015, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * o Redistributions of source code must retain the above copyright notice, this list</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *   of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * o Redistributions in binary form must reproduce the above copyright notice, this</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *   list of conditions and the following disclaimer in the documentation and/or</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *   other materials provided with the distribution.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * o Neither the name of Freescale Semiconductor, Inc. nor the names of its</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *   contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *   software without specific prior written permission.</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef __USB_DISK_H__</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define __USB_DISK_H__ 1</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">#if  defined(USB_DEVICE_CONFIG_EHCI) &amp;&amp; (USB_DEVICE_CONFIG_EHCI&gt;0)</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">#define CONTROLLER_ID         kUSB_ControllerEhci0</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">#endif</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">#if  defined(USB_DEVICE_CONFIG_KHCI) &amp;&amp; (USB_DEVICE_CONFIG_KHCI&gt;0)</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">#define CONTROLLER_ID         kUSB_ControllerKhci0</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">#endif</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#define USB_DEVICE_INTERRUPT_PRIORITY (4)</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment">// Definitions</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#define U32_LE(n) ((n)&amp;0xff), (((n) &gt;&gt; 8) &amp; 0xff), (((n) &gt;&gt; 16) &amp; 0xff), (((n) &gt;&gt; 24) &amp; 0xff)</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#define U16_LE(n) ((n)&amp;0xff), (((n) &gt;&gt; 8) &amp; 0xff)</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">/* Length of Each Logical Address Block */</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#define LENGTH_OF_EACH_LBA (512)</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">/* total number of logical blocks present */</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#define TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL (48)</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="comment">/* Net Disk Size , default disk is 48*512, that is 24kByte, however , the disk reconnised by that PC only has 4k Byte,</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="comment"> * This is caused by that the file system also need memory*/</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="comment">//#define DISK_SIZE_NORMAL (TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL * LENGTH_OF_EACH_LBA)</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">#define LOGICAL_UNIT_SUPPORTED (1)</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#define USB_DEVICE_MSC_WRITE_BUFF_NUM 2</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#define USB_DEVICE_MSC_WRITE_BUFF_SIZE 512</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">#define USB_DEVICE_MSC_READ_BUFF_SIZE 512</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keyword">enum</span> _disk_constants</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">   74</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">kDiskSectorSize</a> = 512,                                        </div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cabe0ef1cac7f6319714bfaed7ff734ec3">   75</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cabe0ef1cac7f6319714bfaed7ff734ec3">kDiskTotalLogicalBlocks</a> = 2048 * 16,                          </div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca5d8b4a5baf1a57df62941ace43410bd8">   76</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca5d8b4a5baf1a57df62941ace43410bd8">kDiskSizeInBytes</a> = <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cabe0ef1cac7f6319714bfaed7ff734ec3">kDiskTotalLogicalBlocks</a> * <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">kDiskSectorSize</a>, </div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca126db34a09eb927798149632d9753153">   77</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca126db34a09eb927798149632d9753153">kDiskLogicalUnits</a> = 1,                                        </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca8b6fdae062afce12ada941572b28a1fe">   78</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca8b6fdae062afce12ada941572b28a1fe">kDiskHeaderSectorCount</a> = 1,                                   </div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891caa7cf49b49cc7079019c796145a59197b">   79</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891caa7cf49b49cc7079019c796145a59197b">kDiskFat16EntrySize</a> = 2,                                      </div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca7949851a095b43cd15909f1e4bdea3e5">   80</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca7949851a095b43cd15909f1e4bdea3e5">kDiskClusterSize</a> = 1,                                         </div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    kDiskDataClusterCount = (<a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cabe0ef1cac7f6319714bfaed7ff734ec3">kDiskTotalLogicalBlocks</a> - <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca8b6fdae062afce12ada941572b28a1fe">kDiskHeaderSectorCount</a>) / <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca7949851a095b43cd15909f1e4bdea3e5">kDiskClusterSize</a>,</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca3f54e5ccf176fd43b94e15643798b0f9">   82</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca3f54e5ccf176fd43b94e15643798b0f9">kDiskSectorsPerFat</a> = (kDiskDataClusterCount * <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891caa7cf49b49cc7079019c796145a59197b">kDiskFat16EntrySize</a> + kDiskSectorSize - 1) /</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                         <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">kDiskSectorSize</a>, </div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;};</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">enum</span> _sector_numbers</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;{</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a0d5db6514cae11cf0d88fe38d2193783">   89</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a0d5db6514cae11cf0d88fe38d2193783">kPbsSector</a> = 0,                                     </div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1a29e77a76c171361e7b5447e4769dbc">   90</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1a29e77a76c171361e7b5447e4769dbc">kFat1Sector</a> = <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a0d5db6514cae11cf0d88fe38d2193783">kPbsSector</a> + 1,                       </div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a96d788280f1c6724d016c992d242e624">   91</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a96d788280f1c6724d016c992d242e624">kFat2Sector</a> = <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1a29e77a76c171361e7b5447e4769dbc">kFat1Sector</a> + <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca3f54e5ccf176fd43b94e15643798b0f9">kDiskSectorsPerFat</a>,     </div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a6e3cbfe52ece4c7468973cc2889fae2b">   92</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a6e3cbfe52ece4c7468973cc2889fae2b">kRootDir1Sector</a> = <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a96d788280f1c6724d016c992d242e624">kFat2Sector</a> + <a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca3f54e5ccf176fd43b94e15643798b0f9">kDiskSectorsPerFat</a>, </div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1d1aaf9be77342f9cf34934b0238063a">   93</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1d1aaf9be77342f9cf34934b0238063a">kRootDir2Sector</a>,                                    </div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15abe70ff4d9aaf446c177fc9f57ab71dde">   94</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15abe70ff4d9aaf446c177fc9f57ab71dde">kMacFseventsdDirSector</a>,                             </div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a40a5cac6db28161f6a278528182cdbc3">   95</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a40a5cac6db28161f6a278528182cdbc3">kWindowsSysVolInfoDirSector</a>,                        </div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a97fc94b533fc6e0337d86b686732bfa7">   96</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a97fc94b533fc6e0337d86b686732bfa7">kWindowsIndexerVolumeGuidSector</a>,                    </div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15abaf1c386a67390d8abecef36b6a65ef0">   97</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15abaf1c386a67390d8abecef36b6a65ef0">kInfoFileSector</a>,                                    </div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a23a765fbc53305efbc66c4898ce46399">   98</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a23a765fbc53305efbc66c4898ce46399">kStatusFileSector</a>,                                  </div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1b296f58edf9c5e089b746814ae778b0">   99</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1b296f58edf9c5e089b746814ae778b0">kFirstUnusedSector</a>,                                 </div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15ad4230715a24024f0a0fc3debbb52c805">  101</a></span>&#160;    <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15ad4230715a24024f0a0fc3debbb52c805">kFirstClusterSector</a> = <a class="code" href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a6e3cbfe52ece4c7468973cc2889fae2b">kRootDir1Sector</a>, </div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;};</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="preprocessor">#define CLUSTER_FROM_SECTOR(s) (((s)-kFirstClusterSector) / kDiskClusterSize)</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="keyword">enum</span> _root_dir_entry_numbers</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;{</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    kInfoFileDirEntry = 11,</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    kStatusFileDirEntry = 12,</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    kFirstUnusedDirEntry = 13</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;};</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html">  119</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>SectorInfo</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;{</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#a0f158864bc8caa13d490ef329600f8b5">  121</a></span>&#160;    uint32_t <a class="code" href="group__usb__msd__disk.html#a0f158864bc8caa13d490ef329600f8b5">sector</a>;     </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#aee6c3208efa0432c75db0e5b2027c037">  122</a></span>&#160;    <span class="keyword">const</span> uint8_t *<a class="code" href="group__usb__msd__disk.html#aee6c3208efa0432c75db0e5b2027c037">data</a>; </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="group__usb__msd__disk.html#aebb70c2aab3407a9f05334c47131a43b">  123</a></span>&#160;    uint32_t <a class="code" href="group__usb__msd__disk.html#aebb70c2aab3407a9f05334c47131a43b">length</a>;     </div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;} <a class="code" href="group__usb__msd__disk.html#structsector__info__t">sector_info_t</a>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> _sb_transfer_status</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;{</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    kReadyStatus = 0,</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    kTransferringStatus,</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    kSuccessStatus,</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    kFailureStatus</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;} sb_transfer_status_t;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> _sb_loader_status</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;{</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    kSbLoaderFree = 0,</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    kSbLoaderInited,</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    kSbLoaderLoading,</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    kSbLoaderFinal,</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;} sb_loader_status_t;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> _sector_buffer_status</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;{</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    kBufferFree = 0, </div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    kBufferPending,  </div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    kBufferFilled,   </div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    kBufferInUse     </div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;} sector_buffer_status_t;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="keyword">enum</span> _usb_msd_constants</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;{</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    kNumberOfSectorBuffers = 2,</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    kInvalidBufferReadIndex = ~0</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;};</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html">  166</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>_usb_msd_state</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;{</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    uint32_t start_app;</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a4c740139cf62c8b615e8f8d22cf73d3a">  169</a></span>&#160;    uint8_t buffer[<a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">kDiskSectorSize</a>];   </div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a03e4d07b25484e5eb37a8ac56d98e64a">  170</a></span>&#160;    uint8_t sbBuffer[<a class="code" href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">kDiskSectorSize</a>]; </div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    uint8_t isDiskLocked;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    uint8_t read_write_error;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a1f90820d1554c5f2d1ce29bc20689866">  173</a></span>&#160;    uint8_t <a class="code" href="structusb__msd__state__t.html#a1f90820d1554c5f2d1ce29bc20689866">isActive</a>;                    </div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#ad6e466ae3a9a982c407b1a22123d0cdf">  174</a></span>&#160;    uint8_t <a class="code" href="structusb__msd__state__t.html#ad6e466ae3a9a982c407b1a22123d0cdf">isTransferring</a>;              </div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    uint8_t sbLoaderStatus;              <span class="comment">// //!&lt; Status to indicate that the SB loader has been initialized.</span></div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a8a5786905ddcae53b55003bbe752076f">  176</a></span>&#160;    uint8_t <a class="code" href="structusb__msd__state__t.html#a8a5786905ddcae53b55003bbe752076f">isProcessing</a>;                </div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a225c2914ef8607b63bb9ee1add219093">  177</a></span>&#160;    uint8_t <a class="code" href="structusb__msd__state__t.html#a225c2914ef8607b63bb9ee1add219093">isReceivePending</a>;            </div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a3683d3d2c9cc6478ede8e49f8e112dfb">  178</a></span>&#160;    uint32_t <a class="code" href="structusb__msd__state__t.html#a3683d3d2c9cc6478ede8e49f8e112dfb">infoFileLength</a>;             </div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a19397f5c186757bbf4972112a429d1dc">  179</a></span>&#160;    uint32_t <a class="code" href="structusb__msd__state__t.html#a19397f5c186757bbf4972112a429d1dc">nextSector</a>;                 </div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a6e1438e628287ef1984fa5aa84e38d59">  180</a></span>&#160;    uint32_t <a class="code" href="structusb__msd__state__t.html#a6e1438e628287ef1984fa5aa84e38d59">remainingFileLength</a>;        </div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a6bd1a93988c310990fdd02b2ffb9243d">  181</a></span>&#160;    uint32_t <a class="code" href="structusb__msd__state__t.html#a6bd1a93988c310990fdd02b2ffb9243d">dataBytesAvailable</a>;         </div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="structusb__msd__state__t.html#a3ed86356331cf97f998bb9974dba8c5e">  182</a></span>&#160;    sb_transfer_status_t <a class="code" href="structusb__msd__state__t.html#a3ed86356331cf97f998bb9974dba8c5e">transferStatus</a>; </div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;} <a class="code" href="structusb__msd__state__t.html">usb_msd_state_t</a>;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="structusb__msc__struct__t.html">  185</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>_usb_msc_struct</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;{</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    usb_device_handle device_handle;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    class_handle_t msc_handle;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="comment">//    uint8_t                   storage_disk[DISK_SIZE_NORMAL];</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <a class="code" href="structusb__msd__state__t.html">usb_msd_state_t</a> msc_state;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    uint8_t current_configuration;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    uint8_t current_interface_alternate_setting[USB_MSC_INTERFACE_COUNT];</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    uint8_t speed;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    uint8_t attach;</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;} <a class="code" href="structusb__msc__struct__t.html">usb_msc_struct_t</a>;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a1b296f58edf9c5e089b746814ae778b0"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1b296f58edf9c5e089b746814ae778b0">kFirstUnusedSector</a></div><div class="ttdoc">First sector available for data. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:99</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891ca7949851a095b43cd15909f1e4bdea3e5"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca7949851a095b43cd15909f1e4bdea3e5">kDiskClusterSize</a></div><div class="ttdoc">Number of sectors per cluster. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:80</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15ad4230715a24024f0a0fc3debbb52c805"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15ad4230715a24024f0a0fc3debbb52c805">kFirstClusterSector</a></div><div class="ttdoc">Sector number of the first cluster. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:101</div></div>
<div class="ttc" id="group__usb__msd__disk_html_structsector__info__t"><div class="ttname"><a href="group__usb__msd__disk.html#structsector__info__t">sector_info_t</a></div><div class="ttdoc">Sector information. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:119</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891ca3f54e5ccf176fd43b94e15643798b0f9"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca3f54e5ccf176fd43b94e15643798b0f9">kDiskSectorsPerFat</a></div><div class="ttdoc">Number of sectors occupied by each FAT, rounded up. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:82</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a8a5786905ddcae53b55003bbe752076f"><div class="ttname"><a href="structusb__msd__state__t.html#a8a5786905ddcae53b55003bbe752076f">usb_msd_state_t::isProcessing</a></div><div class="ttdeci">uint8_t isProcessing</div><div class="ttdoc">Set to true while the SB file is being processed. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:176</div></div>
<div class="ttc" id="group__usb__msd__disk_html_aee6c3208efa0432c75db0e5b2027c037"><div class="ttname"><a href="group__usb__msd__disk.html#aee6c3208efa0432c75db0e5b2027c037">sector_info_t::data</a></div><div class="ttdeci">const uint8_t * data</div><div class="ttdoc">Data for the sector. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:122</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15abe70ff4d9aaf446c177fc9f57ab71dde"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15abe70ff4d9aaf446c177fc9f57ab71dde">kMacFseventsdDirSector</a></div><div class="ttdoc">Mac OS X &amp;#39;.fseventsd&amp;#39; directory. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:94</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cad61c036248234112b347132172a29c56">kDiskSectorSize</a></div><div class="ttdoc">Size in bytes of each sector of the disk. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:74</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a96d788280f1c6724d016c992d242e624"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a96d788280f1c6724d016c992d242e624">kFat2Sector</a></div><div class="ttdoc">FAT2 (unused) </div><div class="ttdef"><b>Definition:</b> msc_disk.h:91</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a1f90820d1554c5f2d1ce29bc20689866"><div class="ttname"><a href="structusb__msd__state__t.html#a1f90820d1554c5f2d1ce29bc20689866">usb_msd_state_t::isActive</a></div><div class="ttdeci">uint8_t isActive</div><div class="ttdoc">Set to true when the first SB file is transferred. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:173</div></div>
<div class="ttc" id="group__usb__msd__disk_html_aebb70c2aab3407a9f05334c47131a43b"><div class="ttname"><a href="group__usb__msd__disk.html#aebb70c2aab3407a9f05334c47131a43b">sector_info_t::length</a></div><div class="ttdeci">uint32_t length</div><div class="ttdoc">Number of bytes of data. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:123</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a40a5cac6db28161f6a278528182cdbc3"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a40a5cac6db28161f6a278528182cdbc3">kWindowsSysVolInfoDirSector</a></div><div class="ttdoc">Windows 8.1 &amp;#39;System Volume Information&amp;#39; directory. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:95</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a1d1aaf9be77342f9cf34934b0238063a"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1d1aaf9be77342f9cf34934b0238063a">kRootDir2Sector</a></div><div class="ttdoc">Root directory 2 (16 x 32-byte entries) </div><div class="ttdef"><b>Definition:</b> msc_disk.h:93</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891ca8b6fdae062afce12ada941572b28a1fe"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca8b6fdae062afce12ada941572b28a1fe">kDiskHeaderSectorCount</a></div><div class="ttdoc">PBS. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:78</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a225c2914ef8607b63bb9ee1add219093"><div class="ttname"><a href="structusb__msd__state__t.html#a225c2914ef8607b63bb9ee1add219093">usb_msd_state_t::isReceivePending</a></div><div class="ttdeci">uint8_t isReceivePending</div><div class="ttdoc">Whether a sector write is being held off until a buffer is free. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:177</div></div>
<div class="ttc" id="structusb__msc__struct__t_html"><div class="ttname"><a href="structusb__msc__struct__t.html">usb_msc_struct_t</a></div><div class="ttdef"><b>Definition:</b> msc_disk.h:185</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891ca5d8b4a5baf1a57df62941ace43410bd8"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca5d8b4a5baf1a57df62941ace43410bd8">kDiskSizeInBytes</a></div><div class="ttdoc">Size in bytes of the total disk. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:76</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a6e3cbfe52ece4c7468973cc2889fae2b"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a6e3cbfe52ece4c7468973cc2889fae2b">kRootDir1Sector</a></div><div class="ttdoc">Root directory 1 (16 x 32-byte entries) </div><div class="ttdef"><b>Definition:</b> msc_disk.h:92</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a3683d3d2c9cc6478ede8e49f8e112dfb"><div class="ttname"><a href="structusb__msd__state__t.html#a3683d3d2c9cc6478ede8e49f8e112dfb">usb_msd_state_t::infoFileLength</a></div><div class="ttdeci">uint32_t infoFileLength</div><div class="ttdoc">Size in bytes of the info.txt file. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:178</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a97fc94b533fc6e0337d86b686732bfa7"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a97fc94b533fc6e0337d86b686732bfa7">kWindowsIndexerVolumeGuidSector</a></div><div class="ttdoc">Windows 8.1 &amp;#39;IndexerVolumeGuid&amp;#39; file. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:96</div></div>
<div class="ttc" id="structusb__msd__state__t_html"><div class="ttname"><a href="structusb__msd__state__t.html">usb_msd_state_t</a></div><div class="ttdoc">State information for the USB MSD peripheral. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:166</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a0d5db6514cae11cf0d88fe38d2193783"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a0d5db6514cae11cf0d88fe38d2193783">kPbsSector</a></div><div class="ttdoc">Partition Boot Sector. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:89</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a6e1438e628287ef1984fa5aa84e38d59"><div class="ttname"><a href="structusb__msd__state__t.html#a6e1438e628287ef1984fa5aa84e38d59">usb_msd_state_t::remainingFileLength</a></div><div class="ttdeci">uint32_t remainingFileLength</div><div class="ttdoc">Total length in bytes of the SB file being transferred. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:180</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891ca126db34a09eb927798149632d9753153"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891ca126db34a09eb927798149632d9753153">kDiskLogicalUnits</a></div><div class="ttdoc">Number of SCSI LUNs. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:77</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a6bd1a93988c310990fdd02b2ffb9243d"><div class="ttname"><a href="structusb__msd__state__t.html#a6bd1a93988c310990fdd02b2ffb9243d">usb_msd_state_t::dataBytesAvailable</a></div><div class="ttdeci">uint32_t dataBytesAvailable</div><div class="ttdoc">Number of bytes available in sectorBuffer. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:181</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15abaf1c386a67390d8abecef36b6a65ef0"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15abaf1c386a67390d8abecef36b6a65ef0">kInfoFileSector</a></div><div class="ttdoc">Info .txt file. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:97</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a19397f5c186757bbf4972112a429d1dc"><div class="ttname"><a href="structusb__msd__state__t.html#a19397f5c186757bbf4972112a429d1dc">usb_msd_state_t::nextSector</a></div><div class="ttdeci">uint32_t nextSector</div><div class="ttdoc">The next expected sector write for the SB file transfer. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:179</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891cabe0ef1cac7f6319714bfaed7ff734ec3"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891cabe0ef1cac7f6319714bfaed7ff734ec3">kDiskTotalLogicalBlocks</a></div><div class="ttdoc">Total number of sectors in the disk. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:75</div></div>
<div class="ttc" id="group__usb__msd__disk_html_a0f158864bc8caa13d490ef329600f8b5"><div class="ttname"><a href="group__usb__msd__disk.html#a0f158864bc8caa13d490ef329600f8b5">sector_info_t::sector</a></div><div class="ttdeci">uint32_t sector</div><div class="ttdoc">Sector number. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:121</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a23a765fbc53305efbc66c4898ce46399"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a23a765fbc53305efbc66c4898ce46399">kStatusFileSector</a></div><div class="ttdoc">Status .txt file. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:98</div></div>
<div class="ttc" id="structusb__msd__state__t_html_ad6e466ae3a9a982c407b1a22123d0cdf"><div class="ttname"><a href="structusb__msd__state__t.html#ad6e466ae3a9a982c407b1a22123d0cdf">usb_msd_state_t::isTransferring</a></div><div class="ttdeci">uint8_t isTransferring</div><div class="ttdoc">Whether an SB file transfer has been started. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:174</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga97039f1cb50fc48cd63d80a38fa3bb15a1a29e77a76c171361e7b5447e4769dbc"><div class="ttname"><a href="group__usb__msd__disk.html#gga97039f1cb50fc48cd63d80a38fa3bb15a1a29e77a76c171361e7b5447e4769dbc">kFat1Sector</a></div><div class="ttdoc">FAT1. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:90</div></div>
<div class="ttc" id="structusb__msd__state__t_html_a3ed86356331cf97f998bb9974dba8c5e"><div class="ttname"><a href="structusb__msd__state__t.html#a3ed86356331cf97f998bb9974dba8c5e">usb_msd_state_t::transferStatus</a></div><div class="ttdeci">sb_transfer_status_t transferStatus</div><div class="ttdoc">Status to present in the status.txt file. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:182</div></div>
<div class="ttc" id="group__usb__msd__disk_html_gga13544a8c09d3e18b6c586e8e5cad891caa7cf49b49cc7079019c796145a59197b"><div class="ttname"><a href="group__usb__msd__disk.html#gga13544a8c09d3e18b6c586e8e5cad891caa7cf49b49cc7079019c796145a59197b">kDiskFat16EntrySize</a></div><div class="ttdoc">Two bytes per FAT16 entry. </div><div class="ttdef"><b>Definition:</b> msc_disk.h:79</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_116c949c1d014b03370bce7ccaa825a4.html">bm_usb</a></li><li class="navelem"><b>msc_disk.h</b></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
